package com.liming.order.client;

import com.liming.common.pojo.vo.order.web.RefundOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liming
 * @date 2025/4/14
 */
@FeignClient(value = "order-service", contextId = "userRefundOrderClient", path = "/service/user-refund-order")
public interface UserRefundOrderClient {

    /**
     * 查询退款详情
     *
     * @param orderId 订单ID
     * @return 退款详情
     */
    @GetMapping("refundDetail/{id}")
    RefundOrderVO refundDetail(@PathVariable("id") Long orderId);

    /**
     * 退款 -- 订单
     *
     * @param id 订单ID
     * @return 退款申请是否成功
     */
    @GetMapping("refund/{id}")
    Boolean refund(@PathVariable Long id, @RequestParam String reason);
}
